package io.adrainty.bolee.insurance.models.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.adrainty.bolee.file.models.entity.FileEntity;
import io.adrainty.bolee.framework.commons.basic.BaseEntity;
import io.adrainty.bolee.framework.commons.basic.EnableEnum;
import io.adrainty.bolee.insurance.models.valobj.CheckRuleEnum;
import io.adrainty.bolee.security.models.entity.CompanyEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>InsuranceEntity</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description 保险
 * @since 2025/8/12 10:49:08
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "保险")
@EqualsAndHashCode(callSuper = true)
public class InsuranceEntity extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 6326166945146207057L;

    @Schema(description = "银保监备案号")
    private String publishNumber;

    @Schema(description = "分类编号")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long categoryNo;

    @Schema(description = "推荐分类")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long recommendCategoryNo;

    @Schema(description = "保险名称")
    private String insuranceName;

    @Schema(description = "金选：0是 1否")
    private String goldSelection;

    @Schema(description = "安心赔：0是 1否")
    private String carefree;

    @Schema(description = "首页热点显示（是0 否1）")
    private String showIndex;

    @Schema(description = "保险标签格式：[{key:200万医疗金，val:指定私立意义}]")
    private String labelsJson;

    @Schema(description = "补充说明格式[{key:失去保障，val:断保将失去相应保障，不能理赔}]")
    private String remakeJson;

    @Schema(description = "可购买起始点")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long timeStart;

    @Schema(description = "可购买起始点单位：天、年")
    private String timeStartUnit;

    @Schema(description = "可购买结束点")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long timeEnd;

    @Schema(description = "可购买结束点单位：天、年")
    private String timeEndUnit;

    @Schema(description = "可投保关系：self,children:spouse,parents")
    private String relation;

    @Schema(description = "排序")
    private Integer sortNo;

    @Schema(description = "团个险（0团 1个）")
    private String multiple;

    @Schema(description = "连续投保年龄")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long continuousInsuranceAge;

    @Schema(description = "校验规则：0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿")
    private CheckRuleEnum checkRule;

    @Schema(description = "企业编号")
    private String companyNo;

    @Schema(description = "保险状态（上架0 下架1）")
    private String insuranceState;

    @Schema(description = "保单宽限")
    private Integer grace;

    @Schema(description = "宽限单位")
    private String graceUnit;

    @Schema(description = "保单复效")
    private Integer revival;

    @Schema(description = "复效单位")
    private String revivalUnit;

    @Schema(description = "产品点评")
    private String comment;

    @Schema(description = "产品描述")
    private String remake;

    @Schema(description = "犹豫期")
    private Integer hesitation;

    @Schema(description = "等待期")
    private Integer waits;

    @Schema(description = "文件VO对象")
    private List<FileEntity> fileVOs;

    @Schema(description = "批量操作：主键ID")
    private String[] checkedIds;

    @Schema(description = "运营费率")
    private BigDecimal operatingRate;

    @Schema(description = "个人代理费率")
    private BigDecimal individualAgentRate;

    @Schema(description = "平台代理费率")
    private BigDecimal platformAgentRate;

    @Schema(description = "保险方案")
    private List<InsurancePlanEntity> insurancePlanVOs;

    @Schema(description = "公司信息")
    private CompanyEntity companyVO;

    @Schema(description = "保险系数项")
    @JsonProperty("insuranceCoefficentVOs")
    private List<InsuranceCoefficientEntity> insuranceCoefficientVOs;

    @Schema(description = "查询：保险筛选项值")
    private List<String> conditionVals;

    @Schema(description = "保险筛选项")
    private List<InsuranceConditionEntity> insuranceConditionVOs;

    @Schema(description = "数据状态：0正常 1禁用")
    private EnableEnum dataState;
    
}
